<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>News system v1</title>


<link rel="stylesheet" type="text/css" href="style.css">


</head>

<body>

<?php
error_reporting(0); 
session_start();
if( $_SESSION['zalogowany_admin']=="tak" )
	{
	
	//echo $_SESSION['zalogowany'];
	//header('Location: ./cw_2.php'); // poprawna wersja
	echo "<meta http-equiv='refresh' content='0;url=./newsmyadm.php'>";	
	//exit;
	}else if($_SESSION['zalogowany_user']=="tak"){
	echo "<meta http-equiv='refresh' content='0;url=./index.php'>";
	}
?>

<div id="exCenter">
    <div id="exHeader">
        <center><h1><a href="index.php">News system v1</a></h1></center>
    </div>
    <div id="exContent">
        <div id="exLogin">
		<center>
			<form name="login_form" action="logging.php" method="post">
			<p>
			Login:<input type="text" name="nazwa" maxlength="20" size="20"/>
			</p>
			<p>
			Password:
			<input type="password" name="haslo" maxlength="20" size="20"/>
			</p>
			<p>
			<input type="submit" name="zaloguj" value="Zaloguj"/>
			</p>
			</form>
			
			<form action="index.php">
				<input type="submit" value="Powrót">
			</form>
			<br>
			<hr>
			<q>
			Logowanie zrobione jedynie prowizorycznie ;)
			</q>
		</center>
        </div>
	</div>
    <div id="exFooter">	    
	    <center>
	        <p><a href="newsmyadm.php">admin © 2014 Basinsky</a></p>
	    </center>    
    </div>
</div>




</body>

</html>
